// Globals.cc
//
// Defines all of the global variables, locks, condition variables, and other data that will be shared by all threads.
// 
// Adding or removing a global variable. REMEMBER TO UPDATE globalsExtern.cc! These two files must be kept in sync to avoid linker errors.

#include "utility.h"
#include "system.h"
#ifdef CHANGED
#include "synch.h"
#endif
#include "TicketClerkCustomerWhiteboard.h"
#include "LineSelectionWhiteboard.h"
#include "GroupWhiteboard.h"
#include "TotalsWhiteboard.h"
#include "FoodClerkCustomerWhiteboard.h"
#include "TicketTakerCustomerWhiteboard.h"
#include "TheaterSelectionWhiteboard.h"
#include "ManagerWhiteboard.h"

Lock* 		ticketClerkCustomerLock[5];
Lock*		groupLock[40];
Lock*		totalsLock;
Lock*       ticketLineSelectionLock;
Lock*		foodLineSelectionLock;
Lock*		foodClerkCustomerLock[5];
Lock*		ticketTakerCustomerLock[5];
Lock*		takerLineSelectionLock;
Lock*		theaterSelectionLock;
Lock*		managerLock;
Lock*		movieTechLock;

Condition* 	ticketClerkCondition[5];
Condition* 	ticketCustomerCondition[5];
Condition*	headCustomerCondition[40];
Condition*	groupCustomerCondition[40];
Condition*  totalsTicketClerkCondition;
Condition*  ticketLineSelectionCondition[5];
Condition* 	foodClerkCondition[5];
Condition*	foodCustomerCondition[5];
Condition*	foodLineSelectionCondition[5];
Condition*  totalsFoodClerkCondition;
Condition*	ticketTakerCondition[5];
Condition*	takerCustomerCondition[5];
Condition*	takerLineSelectionCondition[5];
Condition*	totalsTicketTakerCondition;
Condition*	theaterSeatedCustomerCondition;
Condition*	theaterTicketTakerCondition;
Condition*	theaterMovieTechCondition;
Condition*	managerCondition;
Condition*	movieTechCondition;


TicketClerkCustomerWhiteboard* 			ticketClerkCustomerWhiteboard[5];
GroupWhiteboard* 						groupWhiteboard[40];
LineSelectionWhiteboard* 				ticketLineSelectionWhiteboard;
TotalsWhiteboard* 						totalsWhiteboard;
FoodClerkCustomerWhiteboard*			foodClerkCustomerWhiteboard[5];
LineSelectionWhiteboard*				foodLineSelectionWhiteboard;
TicketTakerCustomerWhiteboard*			ticketTakerCustomerWhiteboard[5];
LineSelectionWhiteboard*				takerLineSelectionWhiteboard;
TheaterSelectionWhiteboard*				theaterSelectionWhiteboard;
ManagerWhiteboard*						managerWhiteboard;
